//
//  UIview+ViewController.swift
//  SinaWeibo25
//
//  Created by apple on 16/3/18.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

extension UIView {
    func navController() -> UINavigationController? {
        var next = nextResponder()
        while next != nil {
            if let nav = next as? UINavigationController {
                return nav
            }
            next = next?.nextResponder()
            
        }
        return nil
    }
}
